<template>
    <div>
        <div class="maindiv">
            <van-steps :active="active">
            <van-step>欢迎</van-step>
            <van-step>认证身份</van-step>
            <van-step>完成</van-step>
            </van-steps>
            <br/><br/><br/><br/>
            <van-button type="info" block :to="actionurl">{{actionbtn}}</van-button>
        </div>
    </div>
</template>

<script>
export default {
    name: "stepsbefore",
    components: {},
    data () {
        return {
            active: 0,
        };
    },
    computed: {
        // username(){
        //     if(sessionStorage.getItem('username'))
        //         return sessionStorage.getItem('username');
        //     else return '未认证'
        // },
        actionbtn(){
            switch(this.active){
                case 0: return "进入认证"
                case 1: return "完成认证"
                default: return "系统错误"
            }
        },
        actionurl(){
            switch(this.active){
                case 0: return "/certificate"
                case 1: return "/home"
                default: return "/"
            }
        }

    },
    created () {

    },
    methods: {}
}

</script>
<style scoped>
    .maindiv{
        height: 240px;
        margin-top: 50%;
    }
</style>
